<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>


<div class="navbar-default sidebar" role="navigation">
	<div class="sidebar-nav navbar-collapse">
	    <ul class="nav" id="side-menu">
	    	<c:forEach items="${sideMenuList_1Level}" var="list" varStatus="c">
    			<li>
				    <a href="${list.URL}?code=${list.MENU_ID}"><i class="fa ${list.ICON} fa-fw"></i> ${list.MENU_NAME}<c:if test="${list.CHILD_NODE_CNT > 0}"><span class="fa arrow"></span></c:if></a>
				<c:if test="${list.CHILD_NODE_CNT > 0}">
				    <ul class="nav nav-second-level" id="${list.MENU_ID}">
				    </ul>
    			</c:if>
    			</li>
			</c:forEach>
		</ul>
	</div>
</div>

<script>
	<c:forEach items="${sideMenuList_2Level}" var="list" varStatus="c">
		$('#${list.PARENT_ID}').append("<li><a href='${list.URL}?code=${list.MENU_ID}'><i class='fa ${list.ICON} fa-fw'></i> ${list.MENU_NAME}</a></li>");
	</c:forEach>
</script>